<template>
    <el-checkbox-group 
        v-model="model"
        :min="option.min"
        :max="option.max">
        <el-checkbox 
            v-for="(checkbox, index) in option.checkboxs" 
            :key="index"
            :label="checkbox.label"
            >
            {{checkbox.value}}
        </el-checkbox>
    </el-checkbox-group>
</template>
<script>
export default {
    name: 'iv-check-box',
    props: {
        value: {
            type: Array,
            default: () => []
        },
        option: {
            type: Object,
            default: () => {}
        }
    },
    computed: {
        model: {
            get() {
                return this.value
            },
            set(val) {
                this.$emit("update:value", val)
            }
        }
    }
}
</script>
<style lang="scss" scoped>
//取消 默认丑布局
.el-checkbox{
    margin-right: 30px;
    &.el-checkbox{
        margin-left: 0 !important;
    }
}
</style>

